/*
 * ZonalTableWriter.java
 *
 * Created on February 28, 2005, 3:11 PM
 */

package edu.temple.GUS.MMA.io;
import java.io.*;
import java.util.*;
/**
 *
 * @author  rkhanna
 */
public class ZonalTableWriter {
    
    /** Creates a new instance of ZonalTableWriter */
    public ZonalTableWriter()
    {
    }
    
    public static void writeTable(Hashtable ht_single_val, String filename)
    {
       try
       {

        FileOutputStream fos = new FileOutputStream(filename, true );                              
        PrintWriter pw = new PrintWriter(fos, true);            
    
            Enumeration e = ht_single_val.keys();
            while (e.hasMoreElements())
            {
                Float ht_key = (Float)e.nextElement();                
                Float ht_val = (Float) ht_single_val.get(ht_key);
                pw.println(ht_key.floatValue()+ " "+ ht_val.floatValue());                                   
            }       
       }catch(Exception e){System.out.println(e);}
    }    
}
